import request from '@/utils/request'

var url = process.env.VUE_APP_XUEYUAN;
var url_pub = process.env.VUE_APP_SUM_PUB;
// var url_pub = 'http://127.0.0.1:8000/api/v1';




// 查询任务列表
export function List(data) {
  return request({
    url: url_pub + '/business-admin/task-manage/task/list',
    method: 'post',
    data: data
  })
}


// 接受任务---接单
export function Erathia(data) {
  return request({
    url: url_pub + '/business-admin/task-manage/task/erathia',
    method: 'post',
    data: data
  })
}

// 用户上传代码-确认已完成
export function UserCompletion(data) {
  return request({
    url: url_pub + '/business-admin/task-manage/task/user_completion',
    method: 'post',
    data: data
  })
}

// 新增
export function Add(data) {
  return request({
    url: '/job',
    method: 'post',
    data: data
  })
}

// 详细
export function Show(id) {
  return request({
    url: '/job/' +id,
    method: 'get'
  })
}

// 修改
export function Update(data) {
  return request({
    url: '/job/'+data.id,
    method: 'put',
    data: data
  })
}

// 删除
export function Delete(id) {
  return request({
    url: '/job/' + id,
    method: 'delete'
  })
}


// 新增
export function AddApi(data) {
  return request({
    url: url_pub + '/business-admin/job-manage/job/create',
    method: 'post',
    data: data
  })
}



export function getListApi(data) {
  return request({
    url: url_pub + '/business-admin/job-manage/job/list',
    method: 'post',
    data: data
  })
}


export function DeleteApi(data) {
  return request({
    url: url_pub + '/business-admin/job-manage/job/delete',
    method: 'post',
    data: data
  })
}


export function DetailApi(data) {
  return request({
    url: url_pub + '/business-admin/job-manage/job/detail',
    method: 'post',
    data: data
  })
}


export function UpdateApi(data) {
  return request({
    url: url_pub + '/business-admin/job-manage/job/modify',
    method: 'post',
    data: data
  })
}



